package com.estun.backroundManagementService.domain.factoryMes;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author yusiocng
 * @date 2023/12/1
 * @description 工厂mes返回
 */

@Data
@AllArgsConstructor
@NoArgsConstructor
public class FactoryMesResponse {

    private String code;
    private String mesg;
    private Boolean success;
    private Boolean fail;

    public static FactoryMesResponse success() {
        return new FactoryMesResponse("000000", "成功", true, false);
    }

    public static FactoryMesResponse error(String errorMesg) {
        return new FactoryMesResponse("000001", errorMesg, false, true);
    }

}
